package Book;

public class Books {
    private String Name;//书名
    private String Author;//作者
    private int Prize;//售价
    private String type;//类型
    private boolean Isborrow;//状态

    public Books(String name, String author, int prize, String type) {
        this.Name = name;
        this.Author = author;
        this.Prize = prize;
        this.type = type;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getAuthor() {
        return Author;
    }

    public void setAuthor(String author) {
        Author = author;
    }

    public int getPrize() {
        return Prize;
    }

    public void setPrize(int prize) {
        Prize = prize;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isIsborrow() {
        return Isborrow;
    }

    public void setIsborrow(boolean isborrow) {
        Isborrow = isborrow;
    }


    @Override
    public String toString() {
        return "Books{" +
                "Name='" + Name + '\'' +
                ", Author='" + Author + '\'' +
                ", Prize=" + Prize +
                ", type='" + type + '\'' +
                ", 状态：" + (Isborrow == true ? "已借出" : "未借出") +
                '}';
    }
}
